package com.ruoyi.pims.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.pims.mapper.RyVendorPerformanceMapper;
import com.ruoyi.pims.domain.RyVendorPerformance;
import com.ruoyi.pims.service.IRyVendorPerformanceService;
import com.ruoyi.common.core.text.Convert;

/**
 * 供应商绩效Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-18
 */
@Service
public class RyVendorPerformanceServiceImpl implements IRyVendorPerformanceService 
{
    @Autowired
    private RyVendorPerformanceMapper ryVendorPerformanceMapper;

    /**
     * 查询供应商绩效
     * 
     * @param performanceId 供应商绩效主键
     * @return 供应商绩效
     */
    @Override
    public RyVendorPerformance selectRyVendorPerformanceByPerformanceId(Long performanceId)
    {
        return ryVendorPerformanceMapper.selectRyVendorPerformanceByPerformanceId(performanceId);
    }

    /**
     * 查询供应商绩效列表
     * 
     * @param ryVendorPerformance 供应商绩效
     * @return 供应商绩效
     */
    @Override
    public List<RyVendorPerformance> selectRyVendorPerformanceList(RyVendorPerformance ryVendorPerformance)
    {
        return ryVendorPerformanceMapper.selectRyVendorPerformanceList(ryVendorPerformance);
    }

    /**
     * 新增供应商绩效
     * 
     * @param ryVendorPerformance 供应商绩效
     * @return 结果
     */
    @Override
    public int insertRyVendorPerformance(RyVendorPerformance ryVendorPerformance)
    {
        return ryVendorPerformanceMapper.insertRyVendorPerformance(ryVendorPerformance);
    }

    /**
     * 修改供应商绩效
     * 
     * @param ryVendorPerformance 供应商绩效
     * @return 结果
     */
    @Override
    public int updateRyVendorPerformance(RyVendorPerformance ryVendorPerformance)
    {
        return ryVendorPerformanceMapper.updateRyVendorPerformance(ryVendorPerformance);
    }

    /**
     * 批量删除供应商绩效
     * 
     * @param performanceIds 需要删除的供应商绩效主键
     * @return 结果
     */
    @Override
    public int deleteRyVendorPerformanceByPerformanceIds(String performanceIds)
    {
        return ryVendorPerformanceMapper.deleteRyVendorPerformanceByPerformanceIds(Convert.toStrArray(performanceIds));
    }

    /**
     * 删除供应商绩效信息
     * 
     * @param performanceId 供应商绩效主键
     * @return 结果
     */
    @Override
    public int deleteRyVendorPerformanceByPerformanceId(Long performanceId)
    {
        return ryVendorPerformanceMapper.deleteRyVendorPerformanceByPerformanceId(performanceId);
    }
}
